<@master template="common/default"  title="流程时效查询(结束)">
<div class="detaiTab  detaiTab1">
<form  action="/aging/process_aging" id="processAgingform" method="get"  class="clearfix">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
	 	 <tr>
		  	 <td class="bg" align="right" width="15%">单号:</td>
		     <td>
				<input id="billCode" class="tabInp"  type="text" name="billCode"  value="${vo.billCode}" />
		    </td>
	    	<td class="bg" align="right" width="15%">省区:</td>
		    <td>
				<select name="province" style="width:150px;">
					<option value="">--请选择--</option>
					<#list provinceList as province>
						<option value="${province.unitCode}" <#if province.unitCode==vo.province>selected="selected"</#if>>${province.orgName}</option>
					</#list>
				</select>
		    </td>	    
	    </tr>
	    <tr>
	    	<td class="bg" align="right" >流程大类:</td>
	    	<td>
	    		<select name="catagory" id="catagory" style="width:150px;">
					<option value="">--请选择--</option>
					<#list catagoryList as catagory>
						<option value="${catagory.code}" <#if catagory.code==vo.catagory>selected="selected"</#if>>${catagory.name}</option>
					</#list>
				</select>
	    	</td>	
			<td class="bg" align="right" width="15%">流程类型:</td>
		    <td>
				<select name="processType" id="processType" style="width:150px;">
					<option value="">--请选择--</option>
					<#list processTypeList as processType>
						<option value="${processType.code}" <#if processType.code==vo.processType>selected="selected"</#if>>${processType.name}</option>
					</#list>
				</select>
		    </td>
	    </tr>
	    <tr>
	    	<td class="bg" align="right" >流程用时:</td>
	    	<td>
	    		<input  class="tabInp"   type="text" id="processTimeS" name="processTimeS" value="${vo.processTimeS}"/>
	    	   -<input  class="tabInp"  type="text" id="processTimeE" name="processTimeE" value="${vo.processTimeE}"  />
	    	   <font color="red"><span id="flag"> </span></font>
	    	</td>
	    	<td class="bg" align="right" >流程开始时间:</td>
	       	<td colspan="3">
	       			<@date name="dateStart" value="${vo.dateStart}" /> 
					-
					<@date name="dateEnd" value="${vo.dateEnd}" /> 
	    	</td>	
	    </tr>
	    <tr>
	    	<td class="bg" align="right" >流程结束时间:</td>
	       	<td colspan="3">
	       			<@date name="dateStartb" value="${vo.dateStartb}" /> 
					-
					<@date name="dateEndb" value="${vo.dateEndb}" /> 
	    	</td>
	    </tr>
	    <tr>
            <td class="bg"></td>
            <td colspan="3" >
                <input type="button"  id="aging" value="搜索" class="btn_auto_30 btn_blue" />
                <@permission permissionName="processTimeExport">
                	<input id="download" value="导出" class="btn_auto_30 btn_blue" type="button"/>(总行数不超过5000)
                </@permission>
                <input type="hidden"  id="oper" name = "oper" value="search" />
            </td>
        </tr>
	 </table>
	</form>
</div>
<div id="process_aging_result"  class="action-ajax-load mt20" data-url="${processAgingUrl}"></div>

<@js>
		(function(){
		$("#catagory").change(function(){
			var catagory = $.trim($("#catagory").val());
			if(catagory.length > 0){
				$.ajax({
		            type:"GET",
		            url:"/raging/wf/getProccessType",
		            data:{"catagory":catagory},
		            datatype:"json",
		            success:function(data){
		            	var processTypeHtml = new Array('<option value="">--请选择--</option>');
		           		$.each(data.data, function(i, item){  
		           			   processTypeHtml.push('<option value="'+item.code+'">'+item.name+'</option>'); 
					　　	});
						var processTypeObj = $("#processType");
						processTypeObj.empty();
						processTypeObj.html(processTypeHtml.join(''));
		            }       
     			});
			}else{
				var processTypeHtml = new Array('<option value="">--请选择--</option>');
				var processTypeObj = $("#processType");
				processTypeObj.empty();
				processTypeObj.html(processTypeHtml.join(''));
			}
		});
	})();
	
	$("#aging").click(function(){
		var processTimeS =	$("#processTimeS").val();
		var processTimeE =	$("#processTimeE").val();
		if(isNaN(processTimeS)||isNaN(processTimeE)){
			$("#flag").html("请输入数字！");
		}else{
			$("#oper").val("search");
			$("#processAgingform").submit();
		}
	});
	
	$("#download").click(function(){
		$("#oper").val("download");
		$("#processAgingform").submit();
	});
</@js>
<@jsRender/>
</@master>